<?php
/**
 * Created by PhpStorm.
 * User: 曹旺
 * Date: 2018-05-14
 * Time: 11:12
 */
namespace app\index\model;
use think\Model;
class UserRole extends Model{
    public function role(){
        return $this->hasOne('Role','id','role_id');
    }
    public function user(){
        return $this->hasOne('User','id','user_id');
    }
}